#pragma once

#include "PairType.h"

class CForwardLinkedListGeneralized;


//type of TMap<Key,Value>
class WHENGINE_API CMapType: public CType
{
public:
    CMapType();

    static CMapType* GetStaticType();

    static CString CreateTypeName(const CString& KeyType, const CString& ValueType);
    static STypeID CreateID(const SDecoratedType & KeyType, const SDecoratedType & ValueType);

protected:
    static CString PlaceholderNameKey;
    static CString PlaceholderNameValue;    

};

class WHENGINE_API CMapGeneralized : public CType
{
public:

    //ValueOffset is the offset of the value in the pair
    CMapGeneralized(
        const SDecoratedType& InKeyType
        ,const SDecoratedType& InValueType
        ,int64_t ValueOffset=0 
        );

    CPairGeneralized* GetPairType();
    SDecoratedType GetKeyType() const ;
    SDecoratedType GetValueType() const ;

    CForwardLinkedListGeneralized * GetForwardForwardLinkedListType() const;

    //static CString CreateTypeName(CType* Key,CType* Value);
protected:

    CPairGeneralized* PairType=nullptr;
    CForwardLinkedListGeneralized* ForwardLinkedListType=nullptr;

};